<template>
  <div class="table-hearder">
    <h4>
      {{ hearderData.title }}
    </h4>
    <div>
      <label>{{ hearderData.label }}</label>
      <input type="text" :placeholder="hearderData.hint" v-model="value" />
      <button class="btn" @click="setTable">{{ hearderData.btn1 }}</button>
      <button class="btn" @click="addTable">{{ hearderData.btn2 }}</button>
    </div>
  </div>
</template>
<script>
export default {
  name: "pageHeader",
  components: {},
  props: {
    hearderData: Object,
  },
  data() {
    return {
      value: "",
    };
  },
  methods: {
    setTable() {
      this.$emit("setTable", this.value);
    },
    addTable() {
      this.$emit("addTable");
    },
  },
  computed: {},
  watch: {},
};
</script>
<style lang="less" scoped>
.table-hearder {
  margin-bottom: 36px;
}
input,
button {
  outline: none;
  box-sizing: border-box;
}
input {
  padding: 10px;
  border-radius: 6px;
  margin-right: 20px;
  border: 1px solid #ccc;
  width: 30%;
}
label {
  margin-right: 12px;
  font-size: 14px;
}
.btn {
  padding: 10px 14px;
  background-color: rgb(58, 173, 250);
  border: 1px solid rgb(58, 173, 250);
  border-radius: 6px;
  color: #fff;
  margin-right: 12px;
}
</style>